﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Graphics;
using Imagine;

namespace Carmack
{
    class GamePlayScreen : GameScreen
    {
        int count;
        int offset;
        SimpleSprite ground;
        CPickables pickme;
        
       public override bool Init(object extraData)   //Any data that needs to be passed from One State to another
       {
           pickme = new CPickables("grenade");
           Vector2 vecPos = new Vector2( Engine.Instance().ScreenWidth+30, Engine.Instance().ScreenHeight+30);
           pickme.Position = vecPos;
           pickme.Identity = ePickables.AssaultRifleAmmo;
           pickme.Value = 60;
           TheWorld.Instance().Add( pickme, 2 );


           offset = 30;
           count = 0;          
           ground = new SimpleSprite("grnd");
           TheWorld.Instance().Add(ground, 0);
           return true;
       }     

       public override bool Draw(GameTime gameTime, SpriteBatch _spritebatch)
       {
           Engine.Instance().GraphicsDevice.Clear(Color.Green);
           _spritebatch.Begin();
           
           _spritebatch.End();
           return true;
       }

       public override bool Update(GameTime gameTime)
       {
           NetworkManager.Instance().BroadcastData();
           NetworkManager.Instance().Session.Update();
           NetworkManager.Instance().InterceptData();
           return true;
       }

       public override bool Release()   {  return true;  }
    }


}
